package cn.anosi.controller;

import java.text.SimpleDateFormat;

import org.activiti.engine.HistoryService;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import cn.anosi.service.auth.PermissionService;
import cn.anosi.service.auth.RolePermissionService;
import cn.anosi.service.auth.RoleService;
import cn.anosi.service.auth.UserService;

public class BaseController {

	@Autowired
	protected UserService userService;

	@Autowired
	protected RoleService roleService;

	@Autowired
	protected PermissionService permissionService;

	@Autowired
	protected RolePermissionService rolePermissionService;

	
	/**
	 *  activiti service
	 */
	@Autowired
	protected RepositoryService repositoryService;
	
	@Autowired
	protected RuntimeService runtimeService;
	
	@Autowired
	protected TaskService taskService;
	
	@Autowired
	protected HistoryService historyService;
	
	protected static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

	protected static final SimpleDateFormat sdf_date = new SimpleDateFormat("yyyy-MM-dd");
	
	protected Logger logger = null;

	protected BaseController() {
		logger = LoggerFactory.getLogger(getClass().getName());
	}
}